<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style>
        #wrapper {
            margin: 40px;
            /*position: relative;*/
            border: 1px darkgoldenrod dashed;
        }
        [id^="div"] {
            width: 100px;
            height: 100px;
            margin: 4px;
            border: 2px solid green;
        }
        #div1 {
            background-color: greenyellow;
        }
        #div2 {
            background-color: lightseagreen;
            position: fixed;
            left: 20px;
            top: 20px;
        }
        #div3 {
            background-color: blueviolet
        }
    </style>
    <title>position示例</title>
</head>
<body>
    <div id="wrapper">
        <div id="div1"></div>
        <div id="div2">
            <span>DIV#2</span>
        </div>
        <div id="div3"></div>
    </div>
</body>
</html>